<template>
  <div class="header-cont">
    <header>
      <div class="logo">
        <a href="/">
          <img src="/images/kylogo.png" alt="">
          <span>
            河南酷音智能科技有限公司
          </span>
        </a>
      </div>
      <div class="nav">
        <ul>
          <li>
            <a href="/">首页</a>
          </li>
          <li>
            <a href="javascript:void(0);">酷音课堂</a>
            <div class="sub-menu">
              <a href="/kyclass/xiaobenke">校本课</a>
              <a href="/kyclass/youer">幼儿音乐</a>
              <a href="/kyclass/gangqin">钢琴课</a>
              <a href="/kyclass/feizhougu">非洲鼓课</a>
            </div>
          </li>
          <li>
            <a href="javascript:void(0);">酷音服务</a>
            <div class="sub-menu">
              <a href="/kyservice">问题反馈</a>
              <a href="/zhuanjia">专家团队</a>
              <a href="/guwen">顾问团队</a>
            </div>
          </li>
          <li>
            <a href="javascript:void(0);">关于我们</a>
            <div class="sub-menu">
              <a href="/jieshao">企业介绍</a>
              <a href="/aboutus">企业文化</a>
            </div>
          </li>
        </ul>
      </div>
    </header>
  </div>
</template>

<style lang="less" scoped>
.header-cont {
  width: 100%;
  height: 99px;
  border-bottom: 1px solid #e3eaf0;
  background: #fff;

  header {
    max-width: 1200px;
    height: 99px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    a {
      display: flex;
      flex-direction: row;
      align-items: center;
    }

    img {
      height: 58px;
    }

    span {
      font-size: 18px;
      color: #3393cf;
      font-weight: bold;
      margin-left: 15px;
    }
  }

  .nav {
    ul {
      list-style: none;
      display: flex;
      flex-direction: row;
    }

    li {
      display: flex;
      align-items: center;
      height: 99px;
      padding: 0 30px;
      position: relative;


      > a {
        font-size: 18px;
        color: #000;
      }

      // :hover {
      //   ::after {
      //     display: block;
      //   }

      //   .sub-menu {
      //     transform: scaleY(1)
      //   }
      // }


      &::after, .on {
        // display: none;
        content: "";
        transform: scaleY(0);
        width: 65%;
        height: 3px;
        background: #00a0e9;
        position: absolute;
        top: 70px;
        left: 17.5%;
        transition: all 0.5s ease;
        transform-origin: 0 0 0;
      }

      &:hover {
        &::after {
          // display: block;
          transform: scaleY(1);
        }

        .sub-menu {
          // display: flex;
          transform: scaleY(1);
        }
      }

    }

    .sub-menu {
      display: flex;
      transform: scaleY(0);
      width: 130px;
      overflow: hidden;
      flex-direction: column;
      position: absolute;
      top: 98px;
      left: 0;
      padding: 20px 0;
      background: rgba(255, 255, 255, .5);
      box-shadow: 0 0 20px 10px rgba(221, 221, 221, .75);
      z-index: 9;
      transition: all 0.5s ease;
      transform-origin: 0 0 0;

      a {
        text-align: center;
        color: #000;
        font-size: 16px;
        margin: 5px 0;

        &:hover {
          color: #00a9e9;
        }
      }
    }
  }
}
</style>
